Open
Conversation
Member
|
Isn't this practically same as bandwhich? |
Contributor
Author
Asked upstream Reply: TL;DR: I would say that RustNet focuses on WHAT is connecting and HOW (protocols, states). Where bandwhich focuses on HOW MUCH (bandwidth tracking).
|
|
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it. |
426cf05 to
af88e15
Compare
Member
|
I want to merge, can you try building on aarch64 once? |
Member
|
Looks fine, add the changelog and good to go |
Contributor
Author
|
@icp1994 Good to go |
Member
diff --git a/srcpkgs/rustnet/template b/srcpkgs/rustnet/template
index fc2bd6ad4a4..2b29506404b 100644
--- a/srcpkgs/rustnet/template
+++ b/srcpkgs/rustnet/template
@@ -5,8 +5,8 @@ revision=1
archs="x86_64* aarch64*"
build_style=cargo
make_check_args="-- --skip test_ebpf"
-hostmakedepends="pkg-config"
-makedepends="libpcap-devel"
+hostmakedepends="pkg-config clang elfutils-devel"
+makedepends="libpcap-devel elfutils-devel zlib-devel"
short_desc="Cross-platform network monitoring terminal UI tool built with Rust"
maintainer="zenobit <zenobit@disroot.org>"
license="Apache-2.0"
@@ -15,13 +15,22 @@ changelog="https://raw.githubusercontent.com/domcyrus/rustnet/refs/heads/main/CH
distfiles="https://github.com/domcyrus/rustnet/archive/refs/tags/v${version}.tar.gz"
checksum=a91773ea19848bcd75339d21b1a811944ef2490feaf8602d5cee6064f4d96ff2
-case "$XBPS_TARGET_MACHINE" in
- aarch64*)
- # Build in procfs-only mode; eBPF cross-compilation not supported
- configure_args="--no-default-features"
- ;;
- *)
- hostmakedepends+=" clang19 elfutils-devel"
- makedepends+=" elfutils-devel zlib-devel"
- ;;
-esac
+_setup_env() {
+ # workaround the cc-rs mixing CFLAGS for host and target.
+ # https://github.com/rust-lang/cc-rs/issues/1469
+ export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}" \
+ CXXFLAGS_${RUST_BUILD//-/_}="${CXXFLAGS_host}" \
+ LDFLAGS_${RUST_BUILD//-/_}="${LDFLAGS_host}" \
+ CFLAGS_${RUST_TARGET//-/_}="${CFLAGS}" \
+ CXXFLAGS_${RUST_TARGET//-/_}="${CXXFLAGS}" \
+ LDFLAGS_${RUST_TARGET//-/_}="${LDFLAGS}" \
+ CFLAGS="" CXXFLAGS="" LDFLAGS=""
+}
+
+pre_build() {
+ _setup_env
+}
+
+pre_install() {
+ _setup_env
+} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Testing the changes
New package
Local build testing